package com.mjlf.project.aop;

import com.mjlf.framework.annotation.aop.After;
import com.mjlf.framework.annotation.aop.Aspect;
import com.mjlf.framework.annotation.aop.Before;
import com.mjlf.project.entity.User;

import java.lang.reflect.Method;
import java.util.Date;

/**
 * @auther a123
 * @create 2018-08-29 16:58
 * @desc
 */
@Aspect
public class ProjectAspectJ {
    @Before(value = "com.mjlf..LoginService.login", returnType = boolean.class)
    public void showTime(Method method, User user){
        System.out.println(method.getName());
        System.out.println(user);
        System.out.println(new Date());
    }

    public void end(){
        System.out.println("end");
    }
}
